﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLuaBase.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class comyouzuwarhprotocolArenaBattleTroopWrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(com.youzu.warh.protocol.ArenaBattleTroop);
			Utils.BeginObjectRegister(type, L, translator, 0, 0, 11, 9);
			
			
			
			Utils.RegisterFunc(L, Utils.GETTER_IDX, "troopId", _g_get_troopId);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "heroList", _g_get_heroList);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "car", _g_get_car);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "soldier", _g_get_soldier);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "damage", _g_get_damage);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "heal", _g_get_heal);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "remainSoldier", _g_get_remainSoldier);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "initPos", _g_get_initPos);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "normalAttackDamage", _g_get_normalAttackDamage);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "attribute", _g_get_attribute);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "normalDps", _g_get_normalDps);
            
			Utils.RegisterFunc(L, Utils.SETTER_IDX, "troopId", _s_set_troopId);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "car", _s_set_car);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "soldier", _s_set_soldier);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "damage", _s_set_damage);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "heal", _s_set_heal);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "remainSoldier", _s_set_remainSoldier);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "initPos", _s_set_initPos);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "normalAttackDamage", _s_set_normalAttackDamage);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "normalDps", _s_set_normalDps);
            
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
			
			
            
			
			
			
            Utils.RegisterFunc(L, Utils.CLS_IDX, "New", __CreateInstanceNew);
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 1)
				{
					
					var gen_ret = new com.youzu.warh.protocol.ArenaBattleTroop();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to com.youzu.warh.protocol.ArenaBattleTroop constructor!");
            
        }

        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstanceNew(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 0)
				{
					
					var gen_ret = new com.youzu.warh.protocol.ArenaBattleTroop();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to com.youzu.warh.protocol.ArenaBattleTroop constructor!");
            
        }

        
		
        
		
        
        
        
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_troopId(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                com.youzu.warh.protocol.ArenaBattleTroop gen_to_be_invoked = (com.youzu.warh.protocol.ArenaBattleTroop)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.troopId);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_heroList(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                com.youzu.warh.protocol.ArenaBattleTroop gen_to_be_invoked = (com.youzu.warh.protocol.ArenaBattleTroop)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.heroList);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_car(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                com.youzu.warh.protocol.ArenaBattleTroop gen_to_be_invoked = (com.youzu.warh.protocol.ArenaBattleTroop)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.car);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_soldier(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                com.youzu.warh.protocol.ArenaBattleTroop gen_to_be_invoked = (com.youzu.warh.protocol.ArenaBattleTroop)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.soldier);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_damage(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                com.youzu.warh.protocol.ArenaBattleTroop gen_to_be_invoked = (com.youzu.warh.protocol.ArenaBattleTroop)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.damage);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_heal(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                com.youzu.warh.protocol.ArenaBattleTroop gen_to_be_invoked = (com.youzu.warh.protocol.ArenaBattleTroop)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.heal);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_remainSoldier(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                com.youzu.warh.protocol.ArenaBattleTroop gen_to_be_invoked = (com.youzu.warh.protocol.ArenaBattleTroop)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.remainSoldier);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_initPos(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                com.youzu.warh.protocol.ArenaBattleTroop gen_to_be_invoked = (com.youzu.warh.protocol.ArenaBattleTroop)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.initPos);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_normalAttackDamage(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                com.youzu.warh.protocol.ArenaBattleTroop gen_to_be_invoked = (com.youzu.warh.protocol.ArenaBattleTroop)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.normalAttackDamage);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_attribute(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                com.youzu.warh.protocol.ArenaBattleTroop gen_to_be_invoked = (com.youzu.warh.protocol.ArenaBattleTroop)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.attribute);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_normalDps(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                com.youzu.warh.protocol.ArenaBattleTroop gen_to_be_invoked = (com.youzu.warh.protocol.ArenaBattleTroop)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.normalDps);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_troopId(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                com.youzu.warh.protocol.ArenaBattleTroop gen_to_be_invoked = (com.youzu.warh.protocol.ArenaBattleTroop)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.troopId = LuaAPI.xlua_tointeger(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_car(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                com.youzu.warh.protocol.ArenaBattleTroop gen_to_be_invoked = (com.youzu.warh.protocol.ArenaBattleTroop)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.car = (com.youzu.warh.protocol.ArenaCar)translator.GetObject(L, 2, typeof(com.youzu.warh.protocol.ArenaCar));
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_soldier(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                com.youzu.warh.protocol.ArenaBattleTroop gen_to_be_invoked = (com.youzu.warh.protocol.ArenaBattleTroop)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.soldier = (com.youzu.warh.protocol.IntPair)translator.GetObject(L, 2, typeof(com.youzu.warh.protocol.IntPair));
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_damage(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                com.youzu.warh.protocol.ArenaBattleTroop gen_to_be_invoked = (com.youzu.warh.protocol.ArenaBattleTroop)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.damage = LuaAPI.xlua_tointeger(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_heal(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                com.youzu.warh.protocol.ArenaBattleTroop gen_to_be_invoked = (com.youzu.warh.protocol.ArenaBattleTroop)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.heal = LuaAPI.xlua_tointeger(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_remainSoldier(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                com.youzu.warh.protocol.ArenaBattleTroop gen_to_be_invoked = (com.youzu.warh.protocol.ArenaBattleTroop)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.remainSoldier = (com.youzu.warh.protocol.IntPair)translator.GetObject(L, 2, typeof(com.youzu.warh.protocol.IntPair));
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_initPos(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                com.youzu.warh.protocol.ArenaBattleTroop gen_to_be_invoked = (com.youzu.warh.protocol.ArenaBattleTroop)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.initPos = LuaAPI.xlua_tointeger(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_normalAttackDamage(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                com.youzu.warh.protocol.ArenaBattleTroop gen_to_be_invoked = (com.youzu.warh.protocol.ArenaBattleTroop)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.normalAttackDamage = LuaAPI.xlua_tointeger(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_normalDps(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                com.youzu.warh.protocol.ArenaBattleTroop gen_to_be_invoked = (com.youzu.warh.protocol.ArenaBattleTroop)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.normalDps = LuaAPI.xlua_tointeger(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
		
		
		
		
    }
}
